<%--@elvariable id="nature" type="com.infitecs.eyas.nature.model.Nature"--%>
<%--
  Created by IntelliJ IDEA.
  User: Demon
  Date: 2015/5/7
  Time: 22:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% request.setCharacterEncoding("UTF-8");%>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
    <script src="<c:url value="/js/quality/nature1.js"/>" type="text/javascript"></script>
</head>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
    <%@include file="../includes/sidebar.jsp" %>
    <div class="page-content-wrapper">
        <div class="page-content">
            <%@include file="../includes/current.jsp" %>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet box">
                        <div class="portlet-body form">
                            <%--<form action="#" class="horizontal-form">--%>
                            <div class="form-body">
                                <div class="row">
                                    <!-- BEGIN LEFT PART-->
                                    <div class="col-md-6">
                                        <div class="col-md-12 margin-bottom-20">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">海拔高度</label>
                                                <div class="col-md-9">
                                                    <input type="text" class="form-control input-inline"
                                                           id="altitude" value="${nature==null?"":nature.altitudeShow}">
                                                        <span class="help-inline">
														m </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-20">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">年平均气温
                                                        </label>

                                                <div class="col-md-9">
                                                    <input type="text" class="form-control input-inline"
                                                           id="annualAverageTemperature"  value="${nature==null?"":nature.annualAverageTemperatureShow}">
                                                        <span class="help-inline">
														℃ </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-20">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">采暖室外计算温度
                                                        </label>

                                                <div class="col-md-9">
                                                    <input type="text" class="form-control input-inline"
                                                           id="outdoorCalculatedTemperature"  value="${nature==null?"":nature.outdoorCalculatedTemperatureShow}">
                                                        <span class="help-inline">
														℃ </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-20">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">年平均相对湿度</label>

                                                <div class="col-md-9">
                                                    <input type="text" class="form-control input-inline"
                                                           id="annualAverageRelativeHumidity" value="${nature==null?"":nature.annualAverageRelativeHumidityShow}">
                                                        <span class="help-inline">
														% </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-20">
                                            <div class="form-group">
                                                <label class="aTypeStyle control-label col-md-3">最低日平均温度</label>
                                                <div class="col-md-9">
                                                    <input type="text" class="form-control input-inline"
                                                           id="minDailyAverageTemperature" value="${nature==null?"":nature.minDailyAverageTemperatureShow}">
                                                        <span class="help-inline">
														℃ </span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- END LEFT PART-->
                                    <!-- BEGIN RIGHT PART-->
                                    <div class="col-md-6">
                                        <div class="col-md-12 margin-bottom-20">
                                            <label class="control-label col-md-3" style="margin-top: 35px">
                                                当地大气压
                                            </label>

                                            <div class="col-md-9">
                                                <div class="col-md-12 margin-bottom-10">
                                                    <input type="text"
                                                           class="form-control input-inline col-md-8"
                                                           id="localPressure" value="${nature==null?"":nature.localPressureShow}">
                                                        <span class="help-inline col-md-4">
														KPa <input type="checkbox" id="localPressureState" name="localPressureState"
                                                        <c:if test="${nature!=null&&operateField.localPressureState=='1'}">
                                                            checked
                                                        </c:if>
                                                          >
                                                        </span>

                                                </div>
                                                <div class="col-md-12 margin-bottom-10">
                                                    <input type="text"
                                                           class="form-control input-inline col-md-8"
                                                           id="localPressureOther" value="${nature==null?"":nature.localPressureOtherShow}">
                                                        <span class="help-inline col-md-4">
														mmHg<input type="checkbox" id="localPressureOtherState" name="localPressureOtherState"
                                                        <c:if test="${nature!=null&&operateField.localPressureOtherState=='1'}">
                                                            checked
                                                        </c:if>
                                                          >
                                                        </span>

                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-20">
                                        <label class="aTypeStyle control-label col-md-3"
                                               style="vertical-align: middle">
                                            夏季通风室外计算温度
                                        </label>

                                        <div class="col-md-7">
                                            <input type="text" class="form-control input-inline"
                                                   id="summerOutdoorCalculateTemperature"  value="${nature==null?"":nature.summerOutdoorCalculateTemperatureShow}">
                                                        <span class="help-inline">℃ </span>

                                        </div>
                                    </div>
                                        <div class="col-md-12 margin-bottom-20">
                                            <label id="annualAverageAirMoistureLabel" class="control-label col-md-3"
                                                   style="vertical-align: middle">
                                                空气含湿量
                                            </label>

                                            <div class="col-md-7">
                                                <input type="text" class="form-control input-inline"
                                                       id="annualAverageAirMoisture"   value="${nature==null?"":nature.annualAverageAirMoistureShow}">
                                                        <span class="help-inline">
														g/kg
                                                <input type="checkbox" id="annualAverageAirMoistureState" name="annualAverageAirMoistureState"
                                                <c:if test="${nature!=null&&operateField.annualAverageAirMoistureState=='1'}">
                                                    checked
                                                </c:if>
                                                  >
                                                        </span>
                                            </div>
                                            <div class="col-md-2">
                                            </div>
                                        </div>
                                        <div class="col-md-12 margin-bottom-20">
                                            <label id="localDensityMoistAirLabel" class="control-label col-md-3"
                                                   style="vertical-align: middle">
                                                当地湿空气密度
                                            </label>

                                            <div class="col-md-7">
                                                <input type="text" class="form-control input-inline"
                                                       id="localDensityMoistAir"  value="${nature==null?"":nature.localDensityMoistAirShow}">
                                                        <span class="help-inline">
														g/kg
                                                <input type="checkbox" id="localDensityMoistAirState" name="localDensityMoistAirState"
                                                 <c:if test="${nature!=null&&operateField.localDensityMoistAirState=='1'}">
                                                    checked
                                                </c:if>
                                                  >
                                                        </span>
                                            </div>
                                            <div class="col-md-2" style="vertical-align: middle">
                                            </div>
                                        </div>
                                        <%--<div class="col-md-12">--%>
                                        <%--<div class="form-body">--%>
                                        <%--<div class=" pull-right">--%>
                                        <%--<button type="button" class="btn green"--%>
                                        <%--id="save">确定--%>
                                        <%--</button>--%>
                                        <%--</div>--%>
                                        <%--</div>--%>
                                        <%--</div>--%>
                                    </div>
                                    <!-- END LEFT PART-->
                                </div>
                                <div class="form-body">
                                       <div class="row">
                                           <div class="col-md-5">
                                           </div>
                                           <div class="col-md-7">
                                               <button type="button" class="btn green" id="save" onclick="NaturePage.natureSave()">确定</button>
                                               <button type="button" class="btn green" id="nextPage" onclick="NaturePage.natureNext()">下一模块</button>
                                           </div>
                                           <!--/span-->
                                       </div>
                                       <!--/span-->
                                   </div>
                                <div class="row">
                                    <div class="col-md-2"></div>
                                    <div class="col-md-8">
                                        <%--<table style="height: 20% ;width: 100% " border="6" cellspacing="5" >--%>
                                        <%--<table width=98%; height:20% ;border="0" cellspacing="0" cellpadding="0" style="border:1px #FF0000 solid;" >--%>
                                        <table style="height: 20% ;width: 100%;  font-size:20px; " border="6"
                                               cellspacing="0" cellpadding="0" rules=none>
                                            <tr>
                                                <td rowspan="2" align="center">标准大气压</td>
                                                <td>101.325 KPa</td>
                                                <td align="center">标态湿空气比重</td>
                                                <td>1.285 Kg/Nm³</td>
                                            </tr>
                                            <tr>
                                                <td>760 mmHg</td>
                                                <td align="center">标态水蒸汽比重</td>
                                                <td>0.804 Kg/Nm³</td>
                                            </tr>
                                        </table>
                                    </div>
                                    <div class="col-md-2"></div>
                                </div>
                                <br> <br>

                                <div class="row">
                                    <div class="col-md-4"></div>
                                    <div class="col-md-3">
                                        <div class="input-group">
                                            <input type="text" class="form-control" data-gautoflag="gAutoCityName"
                                                   id="cityName">
											<span class="input-group-btn">
											<button class="btn green" type="button" id="getNa">查询</button>
											</span>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <button class="btn green" type="button" id="getNaAll">查询全部</button>
                                    </div>
                                </div>
                                <br><br>

                                <div class="row">
                                    <div class="col-md-1"></div>
                                    <div class="col-md-10">
                                        <div class="portlet box blue">
                                            <div class="portlet-title">
                                                <div class="caption">
                                                    <i class="fa fa-comments"></i>自然条件
                                                </div>
                                            </div>
                                            <div class="portlet-body">
                                                <div class="table-responsive">
                                                    <table  class="table table-bordered table-hover">
                                                        <thead>
                                                        <tr>
                                                            <th>城市</th>
                                                            <th>海拔</th>
                                                            <th>大气压力/夏季(hPa）</th>
                                                            <th>大气压力/冬季(hPa)</th>
                                                            <th>年平均温度（℃）</th>
                                                            <th>采暖室外计算温度（℃）</th>
                                                            <th>夏季通风室外计算温度（℃）</th>
                                                            <th>最低日平均温度</th>
                                                            <th>年平均相对湿度（%）</th>
                                                        </tr>
                                                        </thead>
                                                        <tbody id="tbody">
                                                        <%--<tr class="active">--%>
                                                            <%--<td><span id="cityName1"></span></td>--%>
                                                            <%--<td><span id="altitudeSearch"></span></td>--%>
                                                            <%--<td><span id="hpaSumer"></span></td>--%>
                                                            <%--<td><span id="hpaWinter"></span></td>--%>
                                                            <%--<td><span id="avgTep"></span></td>--%>
                                                            <%--<td><span id="outCulTep"></span></td>--%>
                                                            <%--<td><span id="dayLowTep"></span></td>--%>
                                                            <%--<td><span id="relHum"></span></td>--%>
                                                        <%--</tr>--%>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-1"></div>
                                </div>
                            </div>
                            <%--</form>--%>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<input type="hidden" id="caseId" value="${caseId}" name="caseId">
<input type="hidden" id="addFlag" value="${nature==null?"add":"edit"}" name="addFlag">
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/DataTables/media/js/jquery.dataTables.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.core-3.5.min.js"/>"></script>
<script type="text/javascript"
        src="<c:url value="/js/bower_components/ztree_v3/js/jquery.ztree.excheck-3.5.min.js"/>"></script>

<script>
    $(document).ready(function () {
        var caseId = $("#caseId").val();
        if (caseId == "") {
            toast.error("方案为空，请新建方案");
            setTimeout(function () {
                window.location.href = basePath + "power/power?menuId=12";
            }, 1200);
        }
        NaturePage.init();
        NaturePage.localPressureStateClick($("#localPressureState"),1)
        NaturePage.localPressureOtherStateClick($("#localPressureOtherState"),1)
        NaturePage.annualAverageAirMoistureStateClick($("#annualAverageAirMoistureState"),1)
        NaturePage.localDensityMoistAirStateClick($("#localDensityMoistAirState"),1)
    });

</script>
<script type="text/javascript">
    $(function () {
        <%
        String message = (String) request.getAttribute("message");
        if(message!=null&&!"".equals(message)){
        if(message.equals("success")){
        %>
        toast.success("操作成功");
        <%
        }else{
        %>
        toast.error("<%=request.getAttribute("message")%>");
        <%
         }
            }
       %>
    });
</script>
</body>
</html>
